.ng-tinymce {
  display: block;
  width: 100%;

  textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 10px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
  }
}

.ng-tinymce-image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;

  &.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .ng-tinymce-image-preview-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .ng-tinymce-image-preview-caption {
    color: #e2e8f0;
    font-size: 14px;
    text-align: center;
  }

  .ng-tinymce-image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }

  .ng-tinymce-image-preview-body {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
  }

  .ng-tinymce-image-preview-body img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    background: #fff;
    transition: transform 0.2s ease;
    transform-origin: center center;
    pointer-events: auto;
    cursor: grab;
    will-change: transform;
  }

  .ng-tinymce-image-preview-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 90vw;
    padding: 0 12px;
  }

  .ng-tinymce-image-preview-toolbar button {
    border: none;
    min-width: 42px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: #0f172a;
    cursor: pointer;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .ng-tinymce-image-preview-toolbar button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
  }

  .ng-tinymce-image-preview-toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}
